package com.xyzk.diagnose.entity;

import java.util.List;

public class CheryMesInfo {
	private String vin;
	private String MaterialCode;
	private String CarType;
	private String Soft_Code;
	private String status;
	public String emsfile;

	private List<EcuInfo> ECUinfo;
	private int EcuId = -1;
	private int EcuId2 = -1;
	public String getvin() {
		return vin;
	}
	public void setvin(String Pvin) {
		this.vin = Pvin;
	}

	public String getMaterialCode() {
		return MaterialCode;
	}
	public void setMaterialCode(String Pmc)
	{
		this.MaterialCode = Pmc;
	}

	public String getCarType() {
		return CarType;
	}
	public void setCarType(String Pct) {
		this.CarType = Pct;
	}

	public String getSoftCode() {
		return Soft_Code;
	}
	public void setSoftCode(String Pcode) {
		this.Soft_Code = Pcode;
	}

	public String getStatus() {
		return status;
	}
	public void setStatus(String Ps) {
		this.status = Ps;
	}
	public List<EcuInfo> getEcuInfo(){
		return ECUinfo;
	}
	public void setEcuInfo(List<EcuInfo> Pecu)
	{
		this.ECUinfo = Pecu;
	}
	public int getEcuInfoCount()
	{
		if(this.ECUinfo != null)
			return this.ECUinfo.size();
		else
			return 0;
	}
	//记录缓存ID
	public int getEcuId() {
		return EcuId;
	}
	public int getEcuId2() {
		return EcuId2;
	}
	public void ClearEcuId()
	{
		EcuId = -1;
		EcuId2 = -1;
	}
	public void setEcuId(int Pid) {
		if(this.EcuId == -1)
			this.EcuId = Pid;
		else
			this.EcuId2 = Pid;
	}
	@Override
	public String toString() {
		return "VIN:" + vin + "-" + CarType + "-" + Soft_Code + "-" + status + "-" + this.ECUinfo.toString();
	}
}
